package com.happy.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.util.Date;

@TableName ( "record_info" )
public class RecordEntity extends BaseEntity {

    @TableId ( value = "id", type = IdType.AUTO )
    private Integer id;
    @TableField ( "userId" )
    private Integer userId;

    @TableField ( exist = false )
    private String userName;

    @TableField ( "paperId" )
    private Integer paperId;
    @TableField ( exist = false )
    private String paperName; // 连接查询获得的试卷名称
    @TableField ( "createTime" )
    private Date createTime;
    @TableField ( "changeTime" )
    private Date changeTime;
    @TableField ( "isUsed" )
    private Integer isUsed;

    public Integer getId () {
        return id;
    }

    public void setId ( Integer id ) {
        this.id = id;
    }

    public Integer getUserId () {
        return userId;
    }

    public void setUserId ( Integer userId ) {
        this.userId = userId;
    }

    public String getUserName () {
        return userName;
    }

    public void setUserName ( String userName ) {
        this.userName = userName;
    }

    public Integer getPaperId () {
        return paperId;
    }

    public void setPaperId ( Integer paperId ) {
        this.paperId = paperId;
    }

    public String getPaperName () {
        return paperName;
    }

    public void setPaperName ( String paperName ) {
        this.paperName = paperName;
    }

    public Date getCreateTime () {
        return createTime;
    }

    public void setCreateTime ( Date createTime ) {
        this.createTime = createTime;
    }

    public Date getChangeTime () {
        return changeTime;
    }

    public void setChangeTime ( Date changeTime ) {
        this.changeTime = changeTime;
    }

    public Integer getIsUsed () {
        return isUsed;
    }

    public void setIsUsed ( Integer isUsed ) {
        this.isUsed = isUsed;
    }

    @Override
    public String toString () {
        return "RecordEntity{" +
                "id=" + id +
                ", userId=" + userId +
                ", paperId=" + paperId +
                ", createTime=" + createTime +
                ", changeTime=" + changeTime +
                ", isUsed=" + isUsed +
                '}';
    }
}
